import React, { Component } from "react";
import ReactDOM from "react-dom";

class Login extends Component {
	state = { visible: true }

	handleOk = () => {
		this.setState({
			visible: false,
		});
	}

	handleCancel = () => {
		this.handleDestory();
	}

	handleDestory = () => {
		ReactDOM.unmountComponentAtNode(document.getElementById("login"));
	}

	render() {
		return (
			<div>
				<div className="ant-modal-mask"></div>
				<div className="ant-modal-wrap">
					<div className="ant-modal" style={{width: "520px"}}>
						<div className="ant-modal-content">
							<div className="ant-modal-header">
								<div className="ant-modal-title">登录</div>
							</div>
							<div className="ant-modal-body">
								<p>Some contents...</p>
								<p>Some contents...</p>
								<p>Somecontents...</p>
							</div>
							<div className="ant-modal-footer">
								<div>
									<button type="button" className="ant-btn" onClick={this.handleCancel}>
										<span>取 消</span>
									</button>
									<button type="button" className="ant-btn ant-btn-primary">
										<span>确 定</span>
									</button>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		);
	}
}

export default Login;
